use strict ; use warnings ; use Exporter;
use Configurator ; 
use Logger ; 


#	anonymous hash !!!
our ( $confHolder , $objLogger )= () ; 

sub main {
	Initialize();
	$objLogger->LogMsg	(	" START MAIN " ) ; 	


	$objLogger->LogMsg	(	"this is a simple message" ) ; 
	$objLogger->LogErrorMsg	(	"This is an error message " ) ; 
	$objLogger->LogWarningMsg	(	"This is a warning message " ) ; 
	$objLogger->LogInfoMsg	(	"This is a info message " ) ; 
	$objLogger->LogDebugMsg	(	"This is a debug message " ) ; 
	$objLogger->LogTraceMsg	(	"This is a trace message " ) ; 
	$objLogger->LogMsg	(	"using the following log file " .  "$confHolder->{'LogFile'}" ) ; 
	$objLogger->LogMsg	(	" STOP MAIN \n\n" ) ; 

} #eof main 


sub Initialize {

	# strip the remote path and keep the bare name
	$0=~m/^(.*)(\\|\/)(.*)\.([a-z]*)/; 
	my $MyBareName = $3; 
	my $RunDir= $1 ; 

	# create the configurator object 
	my $objConfigurator = new Configurator($RunDir , $MyBareName ); 
	# get the hash having the vars 
	$confHolder = $objConfigurator ->getConfHolder () ; 
	# pring the hash vars 
	print $objConfigurator->dumpIni();	
	$objLogger = new Logger (\$confHolder) ; 
	$objLogger->LogMsg	(	"my \$RunDir is $RunDir" ) ; 
} #eof sub



#Action !!!
main(); 

1 ; 

__END__

